home *** CD-ROM | disk | FTP | other *** search
/ BBS in a Box 1 / BBS in a box - Trilogy I.iso / Files / Publish / N / Nisus PostScript Macros / macro customization < prev    next >
Encoding:
Text File  |  1993-05-21  |  4.7 KB  |  45 lines  |  [TEXT/NISI]

  1. Customizing the PostScript Macros
  2.  
  3. In writing these macros, I have attempted to keep the code as localizable as possible (meaning that the macros should work on any size paper, with different fonts, etc.). I have also elected to do most of the "leg work" in the PostScript code itself, rather than the Nisus macro language. This allows use of the code in programs other than Nisus (though the Nisus macros are easier to use than the freestanding code itself). The Frame macro is somewhat more true to these goals than the backdrop macros, as I had my prior work on those macros to draw from while writing the code for Frame. Most of the tweakable parameters have been included in the "User Customizable Section" that can be modified without breaking the rest code. Hopefully those wishing to customize the appearance of these macros won't haveto dwelve too far into the PostScript code to achieve the desired effect. Good luck
  4. The following section will present each of the changeable variables and briefly discuss what they control. Note that in the macros themselves these variables will be preceded by "Key ", which is Nisus' way of saying "Type this". The values can either be modified in the macro itself using the Edit Macro command in Nisus, or modified directly once they are inserted into the document. When doing the latter, simply select the area where the code resides (usually the top of the page or margin) and change the font to something other than Post Script Escape 1pt. When finished, change the font back to 1pt. Postscript Escape (actually any point size will work, but larger point sizes will occupy more space on the page).
  5.  
  6. %%%%%%%%%%% Start User Customizable Section %%%%%%%%%%%
  7. %%%%%%%%%%%  End User Customizable Section  %%%%%%%%%%%
  8.     These two lines designate the beginning and end of the section of code that contains variables that the user may modify without having to change the resultant code. Once you start modifying things below the End line, you're on your own (though I'd be happy to explain what/why I did some things if you are curious).
  9.  
  10. /title (My Presentation Title) def
  11. /name (name or ??) def
  12. /date (date or company or ??) def 
  13.     These lines set the Title, date, and name strings. They print top center, bottom left, and bottom right respectively. To change them, replace the text between the () with the desired text. The macro currently asks for all of these at the beginning of execution time, stores them in clipboards 1-3, and pastes them in at the appropriate spots. If desired, it should be easy to change this behavior so that, for instance, only the title is asked for and the user's name and company are always placed in the name and date locations. Blank strings () are handled correctly by the PS code and are omitted at print time as are the line breaks where they would normally be located (so entering blanks for all 3 strings results in an unbroken round rectangle). The Backdrop macro does not def the text to be backdropped, but includes it directly in the () center show line (where it can be changed directly — it just didn't make sense to go to the trouble of def'ing it earlier as it is only referred to once).
  14.  
  15. /Helvetica-Bold findfont 72 scalefont setfont
  16.     This (more "standard") line is used in the backdrop macros to select both the font (typeface and size). Replace the "/Helvetica-Bold" with the desired typeface name and the "72" with the desired size.
  17.  
  18. /titlefont /Helvetica-Bold def
  19. /namefont /Helvetica-Bold def
  20. /datefont /Helvetica-Bold def
  21.     These lines are used in the Frame macro to select the typeface each of the strings will be printed in. Replace the "/Helvetica-Bold" with the desired typeface name (use the real PostScript name preceded by /, not the mac's font menu name--make sure it is a font that is either resident in printer ROM or will be downloaded to RAM prior to printing!).
  22.  
  23. /titlesize 18 def
  24. /namesize 14 def
  25. /datesize 14 def
  26.     These lines set the size, in points, that the respective strings will be printed in in the Frame macro. Change the numbers as desired.
  27.  
  28. /arcrad 36 def
  29.     This sets the radius (in points) of the arcs at the corners of the frame. Replace 36 with the desired radius.
  30.  
  31. 2 setlinewidth
  32.     Sets the width of the lines used to draw the frame. Replace 2 with the desired thickness (in points).
  33.  
  34. /height 792 def
  35. /width 612 def
  36.     The width and length of the paper to be used. Values shown are for letter size (US) paper. 
  37.  
  38. /landscape true def
  39.     Set to true if landscape orientation is desired, false for portrait.
  40.  
  41. /marg 72 def
  42.     The margin surrounding the frame (not the margin between the slide and the frame) in points.
  43.  
  44. /numbrpages true def
  45.     Set to true to include the page number in the lower right corner (outside the frame). Not available in the freestanding PS code.